const mysql = require('mysql');

const conn = mysql.createConnection({
  host: '127.0.0.1',
  user: 'root',
  port: '3306',
  password: 'zxdobest890924',
  database: 'myblog'
})

conn.connect();

conn.query('SELECT * FROM users', (err, res) => {
  if(err){
    console.error(err);
    return;
  }
  console.log(res);
})
conn.end();
